package com.xly.webclick.utils;

import android.content.res.AssetManager;
import android.graphics.Typeface;

/**
 * Created by amos on 2018/5/8.
 */

public class FontTypeManager {

    private static Typeface ROBOTO_MEDIUM;

    private static Typeface ROBOTO_REGULAR;

    private static Typeface ROBOTO_BOLD;

    private static Typeface ROBOTO_BLACK;

    public static Typeface getRobotoMedium(AssetManager manager) {
        if (ROBOTO_MEDIUM == null) {
            ROBOTO_MEDIUM=Typeface.createFromAsset(manager,"Roboto-Medium.ttf");
        }
        return ROBOTO_MEDIUM;
    }

    public static Typeface getRobotoRegular(AssetManager manager) {
        if (ROBOTO_REGULAR == null) {
            ROBOTO_REGULAR=Typeface.createFromAsset(manager,"Roboto-Regular.ttf");
        }
        return ROBOTO_REGULAR;
    }

    public static Typeface getRobotoBold(AssetManager manager) {
        if (ROBOTO_BOLD == null) {
            ROBOTO_BOLD=Typeface.createFromAsset(manager,"Roboto-Bold.ttf");
        }
        return ROBOTO_BOLD;
    }


    public static Typeface getRobotoBlack(AssetManager manager) {
        if (ROBOTO_BLACK == null) {
            ROBOTO_BLACK=Typeface.createFromAsset(manager,"Roboto-Black.ttf");
        }
        return ROBOTO_BLACK;
    }

}
